<select>
<optgroup title="A" style="display:contents">
<option>
</select>
<script>
var optgroup = document.querySelector('optgroup');
window.getSelection().collapse(optgroup, 2);
</script>
